package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.ContactObject;
import com.example.fw.Contacts;

public class ContactRemovalTests extends TestBase {
	
	@Test
	public void testFirstContactCanBeRemoved() throws Exception {
		Contacts oldList = app.getContactHelper().getContacts();
		//int contactNumber = 0;
		ContactObject oldContact = oldList.getSomeContact();
		//ContactObject oldContact = app.getContactHelper().getContactByNumber(contactNumber);
		app.getContactHelper().deleteContact(oldContact);
		Contacts newList = app.getContactHelper().getContacts();
		assertThat(newList, equalTo(oldList.without(oldContact)));
	}
}

